package com.wyt.dao;


import com.wyt.entity.Book;
import com.wyt.entity.Book1;
import com.wyt.entity.BookType1;
import org.apache.ibatis.annotations.Param;

import java.util.List;

import java.util.List;

public interface BookMapper1 {
    int deleteByPrimaryKey(Integer bookid);

    int insert(Book1 record);
//部分添加图书信息
    int partinsert(Book1 record);

    int insertSelective(Book1 record);

    Book1 selectByPrimaryKey(Integer typeId);

    int updateByPrimaryKeySelective(Book1 record);

    int updateByPrimaryKeySelectives(@Param("bookid")Integer bookid,@Param("bookstate") Integer bookstate);

    int updateByPrimaryKey(Book1 record);

//    查询所有书本信息
    List<Book1> findAllbook(String bookname);

    //查询所有
    List<Book1> findAllBox(@Param("book") Book1 book,@Param("booktype") BookType1 booktype);
    //搜索条件得模糊查询
    List<Book1> findThree(@Param("bookname")String bookname,@Param("publisher")String publisher,@Param("booktype")String booktype);

    //根据bookid 查询一条数据
    List<Book1> getOneBook(@Param("booktype") BookType1 booktype,@Param("jid") Integer jid);

    //获取总量的库存
    int getAllBookCount(Integer bookid);
    List<Book1> findAlltype(String booktype);

    //总量减少一条
    int countDelOne(@Param("bookcount")Integer bookcount, @Param("bookid")Integer bookid);

    //单个新增出库信息
    int addOut( @Param("pname")String pname,@Param("uid") Integer enumber, @Param("pdate")String nowtime, @Param("bookid")Integer bookid, @Param("totalcount")Integer totalcount, @Param("totalprice")String  totalprice);
    List<Book1> selectAllBook();

}